package myservice.android.utilities;

import java.lang.Thread.UncaughtExceptionHandler;

import myservice.android.Global;

public class CustomExceptionHandler implements UncaughtExceptionHandler {
	
	private UncaughtExceptionHandler defaultUEH;

    public CustomExceptionHandler() {
        this.defaultUEH = Thread.getDefaultUncaughtExceptionHandler();
    }

	@Override
	public void uncaughtException(Thread thread, Throwable ex) {
		
		Global.dumpLogToFile(ex);
		defaultUEH.uncaughtException(thread, ex);
		
	}

}
